<template>
  <div>
    <el-button @click="handleClick2">点我弹出弹框-渲染外部组件</el-button>
  </div>
</template>

<script>
import CreateForm from './CreateForm.vue';
import FormDialog from "@/components/dialog8/FormDialog.vue";

export default {
  name: "FormDialogTest",
  components: {FormDialog},
  data() {
    return {
      showDlg: false,
      hobbyArray: [
        {label: '足球', value: '1'},
        {label: '篮球', value: '2'},
        {label: '乒乓球', value: '3'},
      ]
    }
  },

  methods: {
    handleClick2() {
      this.$formDialog.show({formProps: {hobbyArray: this.hobbyArray}}, CreateForm, (data) => {
        console.log({...data});
      }, (data) => {
      })
    },

    $confirmDelete() {
      console.log("confirm delete");
    }

  }
}
</script>